N = 10 ** 12

def find(B):
    S = B * (B - 1) * 2
    T = int(S ** 0.5) + 1
    if T * (T - 1) == S:
        print B, T
        if T > N:
            print 'YES'
        return B
    return 0

lastB = 15
lastR = 5.0

while 1:
    start = int(lastB * lastR)
    while 1:
        B = find(start)
        if B:
            lastR = 1.0 * B / lastB
            lastB = B
            break
        start += 1


